{# SPDX-License-Identifier: Apache-2.0 #}
{
    "msp_id": "{{ organization.msp.id }}",
    "tls_cert": "{{ lookup('file', organization.wallet + '/tls-root.pem') | b64encode }}",
    "config": {
        "enrollment": {
            "component": {
                "cahost": "{{ ibp[organization.ca.id].hostname }}",
                "caport": "{{ ibp[organization.ca.id].port }}",
                "caname": "{{ ibp[organization.ca.id].caname }}",
                "catls": {
                    "cacert": "{{ lookup('file', organization.wallet + '/ca-tls-root.pem') | b64encode }}"
                },
                "enrollid": "{{ peer.identity  }}",
                "enrollsecret": "{{ peer.secret }}",
                "admincerts": {{ ibp[organization.msp.id].admin_certificates }}
            },
            "tls": {
                "cahost": "{{ ibp[organization.ca.id].hostname }}",
                "caport": "{{ ibp[organization.ca.id].port }}",
                "caname": "{{ ibp[organization.ca.id].tlscaname }}",
                "catls": {
                    "cacert": "{{ lookup('file', organization.wallet + '/ca-tls-root.pem') | b64encode }}"
                },
                "enrollid": "{{ peer.tls.identity }}",
                "enrollsecret": "{{ peer.tls.secret }}"
            }
        }
    },
    "display_name": "{{ peer.ibp.display_name }}",
    "db_type": "{{ 'couchdb' if peer.database_type is defined and peer.database_type == 'couchdb' else 'leveldb' }}",
    "resources": {
        "peer": {
            "requests": {
                "cpu": "200m",
                "memory": "400Mi"
            }
        },
        "grpcweb": {
            "requests": {
                "cpu": "100m",
                "memory": "200Mi"
            }
        },
        "couchdb": {
            "requests": {
                "cpu": "200m",
                "memory": "400Mi"
            }
        },
        "dind": {
            "requests": {
                "cpu": "500m",
                "memory": "1000Mi"
            }
        }
    },
    "storage": {
        "peer": {
            "size": "100Gi"
        },
        "couchdb": {
            "size": "100Gi"
        }
    }
}